home *** CD-ROM | disk | FTP | other *** search
/ iBrowse Update Disc / iBrowse Update Disc.iso / distrib / boot / !Boot / Utils / NewStack < prev    next >
Text File  |  1998-02-19  |  8KB  |  201 lines

  1. | The purpose of the file is to detect what network related
  2. |  modules are present in a machine, with a view to being able
  3. |  to kill them off, load newer underlying modules, such as
  4. |  MBufManager and Internet, and then to restart enough of
  5. |  the protocol stack to permit the remainder of the boot
  6. |  sequence to complete.
  7. |
  8. | It is assumed that a version of Acorn Access is in use : if
  9. |  no other version is available, use of the Applications
  10. |  Accelerator (AUN/Level 4 Release 3 onwards) is recommended.
  11. | This can be loaded by a !ARMBoot, and then control transfered
  12. |  to an Access based boot system.
  13. |
  14. | Thanks to i-cubed Ltd. for supplying their utility to identify
  15. |  which type of EtherH is in use (EHProdCode).
  16. | Note, however, that this is supplied 'as is' and without warranty
  17. |  or support from either Acorn or i-cubed.
  18. |
  19.  
  20. Set System$Path_Message System resources not found.
  21. IF "<BootResources$Path>" = "" THEN Set BootResources$Path <Boot$Dir>.Resources.
  22. IF "<System$Path>" = "" THEN IfThere BootResources:!System Then /BootResources:!System
  23.  
  24. SetEval Inet$$MBuf 3
  25. RMEnsure MBufManager 0.17 SetEval Inet$$MBuf 1
  26. RMEnsure MBufManager 0.00 SetEval Inet$$MBuf 0
  27.  
  28. | Inet$$MBuf values:
  29. |      3:    >= 0.17
  30. |      2:
  31. |      1:    <  0.17
  32. |      0:    No MBufManager present
  33.  
  34. |
  35. | Only need to proceed if MBufManager is OoD, since this implies
  36. |  that the rest of the network software is OK to continue.
  37. |
  38. If <Inet$$MBuf> > 1 Then Obey
  39.  
  40. SetEval Inet$$Internet 3
  41. RMEnsure Internet 5.02 SetEval Inet$$Internet 1
  42. RMEnsure Internet 0.00 SetEval Inet$$Internet 0
  43. If (<Inet$$MBuf> = 1) AND (<Inet$$Internet> > 1) Then SetEval Inet$$Internet 1
  44.  
  45. SetEval Inet$$AUNMsgs 3
  46. RMEnsure AUNMsgs 0.07 SetEval Inet$$AUNMsgs 1
  47. RMEnsure AUNMsgs 0.00 SetEval Inet$$AUNMsgs 0
  48.  
  49. SetEval Inet$$NetMsgs 3
  50. RMEnsure NetMsgs 0.00 SetEval Inet$$NetMsgs 0
  51.  
  52. SetEval Inet$$AccMsgs 3
  53. RMEnsure AccMsgs 0.00 SetEval Inet$$AccMsgs 0
  54.  
  55. SetEval Inet$$InternetA 3
  56. RMEnsure InternetA 0.00 SetEval Inet$$InternetA 0
  57.  
  58. SetEval Inet$$Net  3
  59. RMEnsure Net 6.18 SetEval Inet$$Net 1
  60. RMEnsure Net 0.00 SetEval Inet$$Net 0
  61. If (<Inet$$MBuf> = 1) AND (<Inet$$Net> > 1) Then SetEval Inet$$Net 2
  62.  
  63. SetEval Inet$$ShareFS 3
  64. RMEnsure ShareFS 3.38 SetEval Inet$$ShareFS 1
  65. RMEnsure ShareFS 0.00 SetEval Inet$$ShareFS 0
  66. If (<Inet$$MBuf> = 1) AND (<Inet$$ShareFS> > 1) Then SetEval Inet$$ShareFS 2
  67.  
  68. SetEval Inet$$Freeway 3
  69. RMEnsure Freeway 0.26 SetEval Inet$$Freeway 1
  70. RMEnsure Freeway 0.00 SetEval Inet$$Freeway 0
  71. If (<Inet$$MBuf> = 1) AND (<Inet$$Freeway> > 1) Then SetEval Inet$$Freeway 2
  72.  
  73. SetEval Inet$$LanManFS 3
  74. RMEnsure LanManFS 1.82 SetEval Inet$$LanManFS 1
  75. RMEnsure LanManFS 0.00 SetEval Inet$$LanManFS 0
  76. If (<Inet$$MBuf> = 1) AND (<Inet$$LanManFS> > 1) Then SetEval Inet$$LanManFS 2
  77.  
  78. SetEval Inet$$AppleTalk 3
  79. RMEnsure AppleTalk 0.52 SetEval Inet$$AppleTalk 1
  80. RMEnsure AppleTalk 0.00 SetEval Inet$$AppleTalk 0
  81. If (<Inet$$MBuf> = 1) AND (<Inet$$AppleTalk> > 1) Then SetEval Inet$$AppleTalk 2
  82.  
  83. SetEval Inet$$Ether3 3
  84. RMEnsure Ether3 4.21 SetEval Inet$$Ether3 1
  85. RMEnsure Ether3 0.00 SetEval Inet$$Ether3 0
  86. If (<Inet$$MBuf> = 1) AND (<Inet$$Ether3> > 1) Then SetEval Inet$$Ether3 2
  87.  
  88. SetEval Inet$$EtherH 3
  89. RMEnsure EtherH 4.16 SetEval Inet$$EtherH 1
  90. RMEnsure EtherH 0.00 SetEval Inet$$EtherH 0
  91. If (<Inet$$MBuf> = 1) AND (<Inet$$EtherH> > 1) Then SetEval Inet$$EtherH 2
  92.  
  93. | Inet$$EtherH values:
  94. |      3:    >= 4.16
  95. |      2:    (EtherH vsn >= 4.16) AND old MBufManager present
  96. |      1:    <  4.16
  97. |      0:    No EtherH driver present
  98.  
  99. If Inet$$EtherH >= 1 Then /Boot:Utils.EHProdCode
  100. If Inet$$EtherH >= 1 Then If "<EtherH$Type>" = 0 Then Error 0 Unable to identify EtherH file type
  101. If Inet$$EtherH >= 1 Then Set Alias$EtherHCopy Copy System:Modules.Network.EtherH<EtherH$Type>  RAM:$.* ~c~v
  102. If Inet$$EtherH >= 1 Then Set Alias$EtherHLoad RMLoad RAM:$.EtherH<EtherH$Type>
  103.  
  104. SetEval Inet$$EtherB 3
  105. RMEnsure EtherB 4.21 SetEval Inet$$EtherB 1
  106. RMEnsure EtherB 0.00 SetEval Inet$$EtherB 0
  107. If (<Inet$$MBuf> = 1) AND (<Inet$$EtherB> > 1) Then SetEval Inet$$EtherB 2
  108.  
  109. SetEval Inet$$EtherM 3
  110. RMEnsure EtherM 0.39 SetEval Inet$$EtherM 1
  111. RMEnsure EtherM 0.00 SetEval Inet$$EtherM 0
  112. If (<Inet$$MBuf> = 1) AND (<Inet$$EtherM> > 1) Then SetEval Inet$$EtherM 2
  113.  
  114. SetEval Inet$$EtherO 3
  115. RMEnsure EtherO 4.03 SetEval Inet$$EtherO 1
  116. RMEnsure EtherO 0.00 SetEval Inet$$EtherO 0
  117. If (<Inet$$MBuf> = 1) AND (<Inet$$EtherO> > 1) Then SetEval Inet$$EtherO 2
  118.  
  119. SetEval Inet$$EtherI 3
  120. RMEnsure EtherI 1.01 SetEval Inet$$EtherI 1
  121. RMEnsure EtherI 0.00 SetEval Inet$$EtherI 0
  122. If (<Inet$$MBuf> = 1) AND (<Inet$$EtherI> > 1) Then SetEval Inet$$EtherI 2
  123.  
  124. SetEval Inet$$EtherR 3
  125. RMEnsure EtherR 4.00 SetEval Inet$$EtherR 1
  126. RMEnsure EtherR 0.00 SetEval Inet$$EtherR 0
  127. If (<Inet$$MBuf> = 1) AND (<Inet$$EtherR> > 1) Then SetEval Inet$$EtherR 2
  128.  
  129. ChangeDynamicArea -RamFsSize 256K
  130.  
  131. If <Inet$$Internet> <= 1 Then Copy System:Modules.Network.Internet  RAM:$.* ~c~v
  132. If <Inet$$AUNMsgs>  <= 1 Then Copy System:Modules.Network.AUNMsgs   RAM:$.* ~c~v
  133. If <Inet$$MBuf>     <= 1 Then Copy System:Modules.Network.MManager  RAM:$.* ~c~v
  134. If <Inet$$Freeway>   = 1 Then Copy System:Modules.Network.Freeway   RAM:$.* ~c~v
  135. If <Inet$$ShareFS>   = 1 Then Copy System:Modules.Network.ShareFS   RAM:$.* ~c~v
  136. If <Inet$$Net>       = 1 Then Copy System:Modules.Network.Net       RAM:$.* ~c~v
  137. If <Inet$$Ether3>    = 1 Then Copy System:Modules.Network.Ether3-16 RAM:$.* ~c~v
  138. If <Inet$$EtherH>    = 1 Then EtherHCopy
  139. If <Inet$$EtherH>    = 2 Then EtherHCopy
  140. If <Inet$$EtherB>    = 1 Then Copy System:Modules.Network.EtherB    RAM:$.* ~c~v
  141. If <Inet$$EtherM>    = 1 Then Copy System:Modules.Network.EtherM    RAM:$.* ~c~v
  142. If <Inet$$EtherO>    = 1 Then Copy System:Modules.Network.EtherO    RAM:$.* ~c~v
  143. If <Inet$$EtherI>    = 1 Then Copy System:Modules.Network.EtherI    RAM:$.* ~c~v
  144.  
  145.  
  146. If <Inet$$Net>       > 0 Then RMKill Net
  147. If <Inet$$InternetA> > 0 Then RMKill InternetA
  148. If <Inet$$Internet>  > 0 Then RMKill Internet
  149. If <Inet$$NetMsgs>   > 0 Then RMKill NetMsgs
  150. If <Inet$$AccMsgs>   > 0 Then RMKill AccMsgs
  151. If <Inet$$ShareFS>   > 0 Then RMKill ShareFS
  152. If <Inet$$Freeway>   > 0 Then RMKill Freeway
  153. If <Inet$$LanManFS>  > 0 Then RMKill LanManFS
  154. If <Inet$$AppleTalk> > 0 Then RMKill AppleTalk
  155. If <Inet$$Ether3>    > 0 Then RMKill Ether3
  156. If <Inet$$EtherH>    > 0 Then RMKill EtherH
  157. If <Inet$$EtherB>    > 0 Then RMKill EtherB
  158. If <Inet$$EtherM>    > 0 Then RMKill EtherM
  159. If <Inet$$EtherO>    > 0 Then RMKill EtherO
  160. If <Inet$$EtherI>    > 0 Then RMKill EtherI
  161.  
  162. If <Inet$$MBuf>      > 0 Then RMKill MBufManager
  163.  
  164. If <Inet$$MBuf>      < 3 Then RMLoad RAM:$.MManager
  165. If <Inet$$AUNMsgs>   < 2 Then RMLoad RAM:$.AUNMsgs
  166. If <Inet$$Internet>  < 2 Then RMLoad RAM:$.Internet
  167. If <Inet$$Freeway>   < 2 Then RMLoad RAM:$.Freeway
  168. If <Inet$$ShareFS>   < 2 Then RMLoad RAM:$.ShareFS
  169. If <Inet$$Internet>  = 2 Then RMReinit Internet
  170. If <Inet$$Freeway>   = 2 Then RMReinit Freeway
  171. If <Inet$$ShareFS>   = 2 Then RMReinit ShareFS
  172.  
  173. If <Inet$$Ether3>    = 1 Then RMLoad RAM:$.Ether3-16
  174. If <Inet$$EtherH>    = 1 Then EtherHLoad
  175. If <Inet$$EtherH>    = 2 Then EtherHLoad
  176. If <Inet$$EtherB>    = 1 Then RMLoad RAM:$.EtherB
  177. If <Inet$$EtherM>    = 1 Then RMLoad RAM:$.EtherM
  178. If <Inet$$EtherO>    = 1 Then RMLoad RAM:$.EtherO
  179. If <Inet$$EtherI>    = 1 Then RMLoad RAM:$.EtherI
  180.  
  181. If <Inet$$Ether3>    = 2 Then RMReInit Ether3
  182. | If <Inet$$EtherH>    = 2 Then RMReInit EtherH
  183. If <Inet$$EtherB>    = 2 Then RMReInit EtherB
  184. If <Inet$$EtherM>    = 2 Then RMReInit EtherM
  185. If <Inet$$EtherO>    = 2 Then RMReInit EtherO
  186. If <Inet$$EtherI>    = 2 Then RMReInit EtherI
  187.  
  188. Run Resources:$.Resources.ShareFS.!Boot
  189.  
  190. |
  191. | Now tidy up
  192. |
  193.  
  194. Wipe RAM:$.* ~v~cf
  195. RMKill RamFS
  196. ChangeDynamicArea -RamFsSize 0
  197.  
  198. If Inet$$EtherH >= 1 Then Unset Alias$EtherHCopy 
  199. If Inet$$EtherH >= 1 Then Unset Alias$EtherHLoad 
  200. Unset Inet$$*
  201.